package com.ChenYaRou.www.dao;

import com.ChenYaRou.www.po.TicketShop;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 86183
 */
public interface TicketShopDao {
    /**
     * 查找抵用券集合
     * @param ticketShop 仅赋值条件的抵用券
     * @return 抵用券集合
     * @throws IllegalAccessException
     * @throws SQLException
     * @throws NoSuchFieldException
     * @throws InstantiationException
     */
    List<TicketShop> select(TicketShop ticketShop) throws IllegalAccessException,
            SQLException, NoSuchFieldException, InstantiationException;

    /**
     * update ticketShop number
     * @param newTicketShop ticketShop需要更新的值
     * @param  oldTicketShop old ticketShop
     * @return 成功与否
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int update(TicketShop newTicketShop,TicketShop oldTicketShop) throws IllegalAccessException, SQLException;
    /**
     * 插入抵用券
     * @param ticketShop 新抵用券
     * @return 更新条数
     * @throws IllegalAccessException
     * @throws SQLException
     */
    int insert(TicketShop ticketShop) throws IllegalAccessException, SQLException;
}
